﻿using System;
using System.Collections.Generic;
using System.Text;
using DotNet.Data;
using DotNet.Model;
using DotNet.Common;
namespace DotNet.Business
{
    public class newClassBll
    {
        newClassDal ncDal = new newClassDal();
        #region 是否存在该记录
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int newClassId)
        {
            return ncDal.Exists(newClassId);
        }
        #endregion

        #region 获得新闻类别列表
        /// <summary>
        /// 获得新闻类别列表
        /// </summary>
        /// <returns></returns>
        public IList<newClass> GetModel()
        {
            return ncDal.GetModel();
        }
        #endregion

        #region 根据新闻类别号查询实体
        /// <summary>
        /// 根据新闻类别号查询实体
        /// </summary>
        /// <param name="newClassId"></param>
        /// <returns></returns>
        public newClass GetModel(int newClassId)
        {
            return ncDal.GetModel(newClassId);
        }
        #endregion

        #region 修改新闻类别信息
        /// <summary>
        /// 修改新闻类别信息
        /// </summary>
        /// <param name="newClass"></param>
        /// <returns></returns>
        public bool Update(newClass newClass)
        {
            return ncDal.Update(newClass);
        }
        #endregion

        #region 删除新闻类别根据新闻类别号
        /// <summary>
        /// 删除新闻类别根据新闻类别号
        /// </summary>
        /// <param name="newClassId"></param>
        /// <returns></returns>
        public bool Delete(int newClassId)
        {
            return ncDal.Delete(newClassId);
        }
        #endregion

        #region 添加新闻类别
        /// <summary>
        /// 添加新闻类别
        /// </summary>
        /// <param name="newClass"></param>
        /// <returns></returns>
        public bool Insert(newClass newClass)
        {
            return ncDal.Insert(newClass);
        }
        #endregion

        #region 批量删除新闻类别根据新闻类别号---郑同飞
        /// <summary>
        /// 批量删除新闻类别根据新闻类别号---郑同飞
        /// </summary>
        /// <param name="ncId"></param>
        /// <returns></returns>
        public bool Delete(string[] ncId)
        {
            return ncDal.Delete(ncId);
        }
        #endregion
    }
}
